package com.mgm.test;

import java.math.BigDecimal;
import java.text.DecimalFormat;

public class CurrencyUtil {
	
	private static final String CURRENCY_FORMATE="#,###.00";
	
	public static String currencyFormat(BigDecimal val) {
		if(val == null) {
			return new DecimalFormat(CURRENCY_FORMATE).format(BigDecimal.valueOf(0));
		}
		return new DecimalFormat(CURRENCY_FORMATE).format(val);
	}

}
